package com.fone.player.storage;

/**
 * 
 * 数据库配置信息<br>
 * 数据库的详细设计请参照《缓存和存储模块数据库设计》文档
 * 
 * @author wangyang
 * @since 2014年4月29日
 */
public interface IFoneDatabase {
	/**
	 * 用户表
	 */
	final static String TB_USER = "tb_fone_user";
	// 用户ID
	final static String USER_ID = "user_id";
	// 用户密码
	final static String USER_PASSWORD = "user_password";
	/**
	 * 创建用户表
	 */
	final String CREATE_USER_TABLE = new StringBuilder()
			.append("CREATE TABLE IF NOT EXISTS ").append(TB_USER).append(" (")
			.append(USER_ID + " INTEGER PRIMARY KEY autoincrement,")
			.append(USER_PASSWORD + " TEXT").append(");").toString();

	/**
	 * 文件目录树表(整合表TABLE_LOCAL;TABLE_LOCAL_FOLDER)
	 */
	final static String TB_DIRECTORY_TREE = "tb_directory_tree";
	// id
	static final String DIRECTORY_ID = "id";
	// 目录名称,不带后缀
	static final String DIRECTORY_NAME = "directory_name";
	// 目录名称,带后缀
	static final String DIRECTORY_NAME_SUFFIX = "directory_name_suffix";
	// 目录路径
	static final String DIRECTORY_PATH = "directory_path";
	// 目录父路径
	static final String DIRECTORY_PARENT_PATH = "directory_parent_path";
	// 目录更改时间
	static final String DIRECTORY_DATE_MODIFIED = "directory_date_modified";
	// 目录作者
	static final String DIRECTORY_AUTHOR_NAME = "directory_author_name";
	// 目录类型(0是文件;1是文件夹)
	static final String DIRECTORY_TYPE = "directory_type";
	// 文件专辑名
	static final String FILE_ALBUM_NAME = "file_album_name";
	// 文件大小
	static final String FILE_SIZE = "file_size";
	// 文件时长
	static final String FILE_DATE_DURATION = "file_date_duration";
	// 文件是否已加密(0未加密,1已加密)
	static final String FILE_IS_ENCRYPT = "file_is_encrypt";
	// 文件加密时的时间
	static final String FILE_ENCRYPT_TIME = "file_encrypt_time";

	/**
	 * 创建文件目录树表
	 */
	final String CREATE_DIRECTORY_TREE_TABLE = new StringBuilder()
			.append("CREATE TABLE IF NOT EXISTS ")
			.append(TB_DIRECTORY_TREE)
			.append(" (")
			.append(DIRECTORY_ID + " INTEGER PRIMARY KEY autoincrement,")
			.append(DIRECTORY_NAME + " TEXT,")
			.append(DIRECTORY_NAME_SUFFIX + " TEXT,")
			.append(DIRECTORY_PATH + " TEXT unique,")
			// 路径唯一
			.append(DIRECTORY_PARENT_PATH + " TEXT,")
			.append(DIRECTORY_DATE_MODIFIED + " LONG,")
			.append(DIRECTORY_AUTHOR_NAME + " TEXT,")
			.append(DIRECTORY_TYPE + " INT,")
			.append(FILE_ALBUM_NAME + " TEXT,").append(FILE_SIZE + " LONG,")
			.append(FILE_DATE_DURATION + " LONG,")
			.append(FILE_IS_ENCRYPT + " INT,")
			.append(FILE_ENCRYPT_TIME + " LONG").append(");").toString();

	/**
	 * 离线缓存文件夹表
	 */
	final static String TB_OFFLINE_CACHE_FOLDER = "tb_offline_cache_folder";
	// ID
	static final String OFFLINE_CACHE_FOLDER_ID = "id";
	// CID
	static final String OFFLINE_CACHE_FOLDER_CID = "cid";
	// CID
	static final String OFFLINE_CACHE_FOLDER_CCID = "ccid";
	// videoID
	static final String OFFLINE_CACHE_FOLDER_VIDEO_ID = "video_id";
	// 节目名称
	static final String OFFLINE_CACHE_FOLDER_NAME = "offline_cache_folder_name";
	// 节目图片
	static final String OFFLINE_CACHE_FOLDER_IMAGE_URL = "offline_cache_folder_image_url";
	// 选集编号(第1季或第1部等)
	static final String OFFLINE_CACHE_FOLDER_EPISODE_NUM = "offline_cache_folder_episode_num";
	// 节目最新片段(更新至1集或1季)
	static final String OFFLINE_CACHE_FOLDER_EPISODE_UPDATE_INFO = "offline_cache_folder_episode_update_info";
	// 节目内容类型(电影,电视剧,短片等)
	static final String OFFLINE_CACHE_FOLDER_CONTENT_TYPE = "offline_cache_folder_content_type";
	// 节目播放和缓存地址
	static final String OFFLINE_CACHE_FOLDER_XYZPLAY_URL = "offline_cache_folder_xyzplay_url";
	// 节目剧集地址
	static final String OFFLINE_CACHE_FOLDER_DRAMA_URL = "offline_cache_folder_drama_url";
	// 节目添加时间
	static final String OFFLINE_CACHE_FOLDER_CREATE_TIME = "offline_cache_folder_create_time";
	// 节目来源(土豆,优酷)(2014_8_25 新版本升级数据库)
	static final String OFFLINE_CACHE_FOLDER_SOURCE_NAME = "offline_cache_folder_source_name";
	/**
	 * 创建离线缓存文件夹表
	 */
	final String CREATE_OFFLINE_CACHE_FOLDER_TABLE = new StringBuilder()
			.append("CREATE TABLE IF NOT EXISTS ")
			.append(TB_OFFLINE_CACHE_FOLDER)
			.append(" (")
			.append(OFFLINE_CACHE_FOLDER_ID
					+ " INTEGER PRIMARY KEY autoincrement,")
			.append(OFFLINE_CACHE_FOLDER_CID + " LONG,")
			.append(OFFLINE_CACHE_FOLDER_CCID + " LONG unique,")
			.append(OFFLINE_CACHE_FOLDER_VIDEO_ID + " LONG,")
			.append(OFFLINE_CACHE_FOLDER_NAME + " TEXT,")
			.append(OFFLINE_CACHE_FOLDER_IMAGE_URL + " TEXT,")
			.append(OFFLINE_CACHE_FOLDER_EPISODE_NUM + " TEXT,")
			.append(OFFLINE_CACHE_FOLDER_EPISODE_UPDATE_INFO + " TEXT,")
			.append(OFFLINE_CACHE_FOLDER_CONTENT_TYPE + " INT,")
			.append(OFFLINE_CACHE_FOLDER_XYZPLAY_URL + " TEXT,")
			.append(OFFLINE_CACHE_FOLDER_DRAMA_URL + " TEXT,")
			.append(OFFLINE_CACHE_FOLDER_SOURCE_NAME + " TEXT,")
			.append(OFFLINE_CACHE_FOLDER_CREATE_TIME + " LONG").append(");")
			.toString();
	/**
	 * 离线缓存文件表(TABLE_DOWNLOAD_TASK; TABLE_DOWNLOAD_TASKED)
	 */
	final static String TB_OFFLINE_CACHE_FILE = "tb_offline_cache_file";
	// ID
	static final String OFFLINE_CACHE_FILE_ID = "id";
	// CID
	static final String OFFLINE_CACHE_FILE_CID = "cid";
	// CID
	static final String OFFLINE_CACHE_FILE_CCID = "ccid";
	// videoID
	static final String OFFLINE_CACHE_FILE_VIDEO_ID = "video_id";
	// 节目名称
	static final String OFFLINE_CACHE_FILE_NAME = "offline_cache_file_name";
	// 节目图片
	static final String OFFLINE_CACHE_FILE_IMAGE_URL = "offline_cache_file_image_url";
	// 选集编号(第1季或第1部等)
	static final String OFFLINE_CACHE_FILE_EPISODE_NUM = "offline_cache_file_episode_num";
	// 节目已经缓存的大小
	static final String OFFLINE_CACHE_FILE_ALREADY_SIZE = "offline_cache_file_already_size";
	// 节目总大小
	static final String OFFLINE_CACHE_FILE_TOTAL_SIZE = "offline_cache_file_total_size";
	// 节目缓存状态(-2边播边下,-1和3暂停,1下载中,0和6等待,4失败,7未缓存(收藏且未缓存))
	static final String OFFLINE_CACHE_FILE_DOWNLOAD_STATE = "offline_cache_file_download_state";
	// 节目内容类型(电影,电视剧,短片等)
	static final String OFFLINE_CACHE_FILE_CONTENT_TYPE = "offline_cache_file_content_type";
	// 节目清晰度(1标清,2高清,3超清)
	static final String OFFLINE_CACHE_FILE_DEFINITION_TYPE = "offline_cache_file_definition_type";
	// 下载类型(1离线缓存,2图片,3apk,4边播边下)
	static final String OFFLINE_CACHE_FILE_DOWNLOAD_TYPE = "offline_cache_file_download_type";
	// 总时长
	static final String OFFLINE_CACHE_FILE_DURATION = "offline_cache_file_duration";
	// 节目下的碎片数量
	static final String OFFLINE_CACHE_FILE_FRAGMENT_COUNT = "offline_cache_file_fragment_count";
	// 缓存本地路径
	static final String OFFLINE_CACHE_FILE_STORAGE_PATH = "offline_cache_file_storage";
	// 节目播放和缓存地址
	static final String OFFLINE_CACHE_FILE_XYZPLAY_URL = "offline_cache_file_xyzplay_url";
	// 节目排序索引
	static final String OFFLINE_CACHE_FILE_SORT_INDEX = "offline_cache_file_sort_index";
	// 节目错误码,用于判断下载状态
	@Deprecated
	static final String OFFLINE_CACHE_FILE_ERROR_CODE = "offline_cache_file_error_code";
	// 节目创建时间
	static final String OFFLINE_CACHE_FILE_CREATE_TIME = "offline_cache_file_create_time";

	/**
	 * 创建离线缓存文件表
	 */
	final String CREATE_OFFLINE_CACHE_FILE_TABLE = new StringBuilder()
			.append("CREATE TABLE IF NOT EXISTS ")
			.append(TB_OFFLINE_CACHE_FILE)
			.append(" (")
			.append(OFFLINE_CACHE_FILE_ID
					+ " INTEGER PRIMARY KEY autoincrement,")
			.append(OFFLINE_CACHE_FILE_CID + " LONG unique,")
			.append(OFFLINE_CACHE_FILE_CCID + " LONG,")
			.append(OFFLINE_CACHE_FILE_VIDEO_ID + " LONG,")
			.append(OFFLINE_CACHE_FILE_NAME + " TEXT,")
			.append(OFFLINE_CACHE_FILE_IMAGE_URL + " TEXT,")
			.append(OFFLINE_CACHE_FILE_EPISODE_NUM + " TEXT,")
			.append(OFFLINE_CACHE_FILE_ALREADY_SIZE + " LONG,")
			.append(OFFLINE_CACHE_FILE_TOTAL_SIZE + " LONG,")
			.append(OFFLINE_CACHE_FILE_DOWNLOAD_STATE + " INT,")
			.append(OFFLINE_CACHE_FILE_CONTENT_TYPE + " INT,")
			.append(OFFLINE_CACHE_FILE_DEFINITION_TYPE + " INT,")
			.append(OFFLINE_CACHE_FILE_DOWNLOAD_TYPE + " INT,")
			.append(OFFLINE_CACHE_FILE_DURATION + " LONG,")
			.append(OFFLINE_CACHE_FILE_FRAGMENT_COUNT + " INT,")
			.append(OFFLINE_CACHE_FILE_STORAGE_PATH + " TEXT,")
			.append(OFFLINE_CACHE_FILE_XYZPLAY_URL + " TEXT,")
			.append(OFFLINE_CACHE_FILE_SORT_INDEX + " INT,")
			.append(OFFLINE_CACHE_FILE_ERROR_CODE + " INT,")
			.append(OFFLINE_CACHE_FILE_CREATE_TIME + " LONG").append(");")
			.toString();

	/**
	 * 离线缓存碎片表(TABLE_DOWNLOAD_TASK;TABLE_DOWNLOAD_UNIT;
	 * TABLE_DOWNLOAD_TASKED;TABLE_DOWNLOAD_UNITED)
	 */
	final static String TB_OFFLINE_CACHE_FRAGMENT = "tb_offline_cache_fragment";
	/**
	 * 临时表
	 */
	final static String TB_OFFLINE_CACHE_FRAGMENT_BACK_UP = "tb_offline_cache_fragment_back_up";
	// CID
	static final String OFFLINE_CACHE_FRAGMENT_CID = "cid";
	// 下载队列的索引
	static final String OFFLINE_CACHE_FRAGMENT_INDEX = "offline_cache_fragment_index";
	// 节目已经缓存的大小
	static final String OFFLINE_CACHE_FRAGMENT_ALREADY_SIZE = "offline_cache_fragment_already_size";
	// 节目总大小
	static final String OFFLINE_CACHE_FRAGMENT_TOTAL_SIZE = "offline_cache_fragment_total_size";
	// 节目缓存状态(-2边播边下,-1和3暂停,1下载中,0和6等待,4失败,7未缓存(收藏且未缓存))
	static final String OFFLINE_CACHE_FRAGMENT_DOWNLOAD_STATE = "offline_cache_fragment_download_state";
	// 节目清晰度(1标清,2高清,3超清)
	static final String OFFLINE_CACHE_FRAGMENT_DEFINITION_TYPE = "offline_cache_fragment_definition_type";
	// 总时长
	static final String OFFLINE_CACHE_FRAGMENT_DURATION = "offline_cache_fragment_duration";
	// 碎片下载地址
	static final String OFFLINE_CACHE_FRAGMENT_URL = "offline_cache_fragment_url";
	// 碎片下载地址md5
	static final String OFFLINE_CACHE_FRAGMENT_URL_MD5 = "offline_cache_fragment_url_md5";
	/**
	 * 创建离线缓存碎片表
	 */
	final String CREATE_OFFLINE_CACHE_FRAGMENT_TABLE = new StringBuilder()
			.append("CREATE TABLE IF NOT EXISTS ")
			.append(TB_OFFLINE_CACHE_FRAGMENT).append(" (")
			.append(OFFLINE_CACHE_FRAGMENT_CID + " LONG,")
			.append(OFFLINE_CACHE_FRAGMENT_INDEX + " INT,")
			.append(OFFLINE_CACHE_FRAGMENT_ALREADY_SIZE + " LONG,")
			.append(OFFLINE_CACHE_FRAGMENT_TOTAL_SIZE + " LONG,")
			.append(OFFLINE_CACHE_FRAGMENT_DOWNLOAD_STATE + " INT,")
			.append(OFFLINE_CACHE_FRAGMENT_DEFINITION_TYPE + " INT,")
			.append(OFFLINE_CACHE_FRAGMENT_DURATION + " LONG,")
			.append(OFFLINE_CACHE_FRAGMENT_URL + " TEXT unique,")
			.append(OFFLINE_CACHE_FRAGMENT_URL_MD5 + " TEXT").append(");")
			.toString();
	/**
	 * 创建离线缓存碎片临时表(4.0升级4.0.1)
	 */
	final String CREATE_OFFLINE_CACHE_FRAGMENT_TEMPORARY_TABLE_4_0_TO_4_0_5 = new StringBuilder()
			.append("CREATE TEMPORARY TABLE IF NOT EXISTS ")
			.append(TB_OFFLINE_CACHE_FRAGMENT_BACK_UP).append(" (")
			.append(OFFLINE_CACHE_FRAGMENT_CID + " LONG,")
			.append(OFFLINE_CACHE_FRAGMENT_INDEX + " INT,")
			.append(OFFLINE_CACHE_FRAGMENT_ALREADY_SIZE + " LONG,")
			.append(OFFLINE_CACHE_FRAGMENT_TOTAL_SIZE + " LONG,")
			.append(OFFLINE_CACHE_FRAGMENT_DOWNLOAD_STATE + " INT,")
			.append(OFFLINE_CACHE_FRAGMENT_DEFINITION_TYPE + " INT,")
			.append(OFFLINE_CACHE_FRAGMENT_DURATION + " LONG,")
			.append(OFFLINE_CACHE_FRAGMENT_URL + " TEXT,")
			.append(OFFLINE_CACHE_FRAGMENT_URL_MD5 + " TEXT").append(");")
			.toString();
	/**
	 * 收藏表(整合表TABLE_FAVORITE)
	 */
	final static String TB_FAVOURITE = "tb_favourite";
	// id自增长,排序用
	static final String FAVOURITE_ID = "id";
	// cid
	static final String FAVOURITE_CID = "cid";
	// ccid
	static final String FAVOURITE_CCID = "ccid";
	// videoId
	static final String FAVOURITE_VIDEO_ID = "video_id";
	// clid
	static final String FAVOURITE_CLID = "clid";
	// 节目名称
	static final String FAVOURITE_NAME = "favourite_name";
	// 节目图片
	static final String FAVOURITE_IMAGE_URL = "favourite_image_url";
	// 节目片段(第1季或第1部等)
	static final String FAVOURITE_EPISODE_NUM = "favourite_episode_num";
	// 节目最新片段(更新至1集或1季)
	static final String FAVOURITE_EPISODE_UPDATE_INFO = "favourite_episode_info";
	// 节目内容类型(电影,电视剧,短片等)
	static final String FAVOURITE_CONTENT_TYPE = "favourite_content_type";
	// 记录列表下载选中状态,0否,1是
	static final String FAVOURITE_IS_DOWNLOAD = "favourite_is_download";
	// 记录列表是否可下载,0否,1是
	static final String FAVOURITE_IS_DOWNLOADABLE = "favourite_is_downloadable";
	// 节目对应详情页地址
	static final String FAVOURITE_DETAIL_URL = "favourite_detail_url";
	// 节目播放地址
	static final String FAVOURITE_XYZPLAY_URL = "favourite_xyzplay_url";
	// 剧集地址
	static final String FAVOURITE_DRAMA_URL = "favourite_drama_url";
	// 节目同步状态
	static final String FAVOURITE_SYNCHRONZIE_TYPE = "favourite_synchronzie_type";
	// 记录添加收藏记录位置的上报点
	static final String FAVOURITE_REPORT_PAGE = "favourite_report_page";
	// 是否是VIP,付费播放时使用
	static final String FAVOURITE_IS_VIP = "favourite_is_vip";
	// 收藏时间
	static final String FAVOURITE_CREATE_TIME = "favourite_create_time";
	/**
	 * 创建收藏表
	 */
	final String CREATE_FAVOURITE_TABLE = new StringBuilder()
			.append("CREATE TABLE IF NOT EXISTS ").append(TB_FAVOURITE)
			.append(" (")
			.append(FAVOURITE_ID + " INTEGER PRIMARY KEY autoincrement,")
			.append(FAVOURITE_CID + " LONG,").append(FAVOURITE_CCID + " LONG,")
			.append(FAVOURITE_VIDEO_ID + " LONG unique,")
			.append(FAVOURITE_CLID + " LONG,")
			.append(FAVOURITE_NAME + " TEXT,")
			.append(FAVOURITE_IMAGE_URL + " TEXT,")
			.append(FAVOURITE_EPISODE_NUM + " TEXT,")
			.append(FAVOURITE_EPISODE_UPDATE_INFO + " INT,")
			.append(FAVOURITE_CONTENT_TYPE + " INT,")
			.append(FAVOURITE_IS_DOWNLOAD + " INT,")
			.append(FAVOURITE_IS_DOWNLOADABLE + " INT,")
			.append(FAVOURITE_DETAIL_URL + " TEXT,")
			.append(FAVOURITE_XYZPLAY_URL + " TEXT,")
			.append(FAVOURITE_DRAMA_URL + " TEXT,")
			.append(FAVOURITE_SYNCHRONZIE_TYPE + " INT,")
			.append(FAVOURITE_REPORT_PAGE + " INT,")
			.append(FAVOURITE_IS_VIP + " INT,")
			.append(FAVOURITE_CREATE_TIME + " LONG").append(");").toString();
	/**
	 * 播放记录表(整合表TABLE_PLAYED)
	 */
	final static String TB_PLAY_RECORD = "tb_play_record";
	// cid
	static final String PLAY_RECORD_CID = "cid";
	// ccid
	static final String PLAY_RECORD_CCID = "ccid";
	// clid
	static final String PLAY_RECORD_CLID = "clid";
	// videoId
	static final String PLAY_RECORD_VIDEO_ID = "video_id";
	// 播放记录类型
	static final String PLAY_RECORD_TYPE = "play_record_type";
	// 节目内容类型(电影,电视剧,短片等)
	static final String PLAY_RECORD_CONTENT_TYPE = "play_record_content_type";
	// 节目名称
	static final String PLAY_RECORD_NAME = "play_record_name";
	// 节目缩略图路径
	static final String PLAY_RECORD_IMAGE_URL = "play_record_image_url";
	// 节目播放地址
	static final String PLAY_RECORD_PLAY_URL = "play_record_play_url";
	// 节目已经播放的位置
	static final String PLAY_RECORD_ALREADY_PLAY_TIME = "play_record_already_play_time";
	// 节目时长
	static final String PLAY_RECORD_TOTAL_TIME = "play_record_total_time";
	// 播放记录创建的时间
	static final String PLAY_RECORD_CTEATE_TIME = "play_record_create_time";
	// 是否是vip
	static final String PLAY_RECORD_IS_VIP = "play_record_is_vip";
	// 记录描述
	static final String PLAY_RECORD_DESCRIPTION = "play_record_description";
	// 服务器删除播放记录时的请求地址
	static final String PLAY_RECORD_REMOVE_URL = "play_record_remove_url";
	// 服务器收藏视频时的请求地址
	static final String PLAY_RECORD_FAVOURITE_URL = "play_record_favourite_url";
	// 小屏播放时的请求地址
	static final String PLAY_RECORD_DETAIL_URL = "play_record_detail_url";
	// 分享时的请求地址
	static final String PLAY_RECORD_SHARE_URL = "play_record_share_url";
	// 播放记录同步状态
	static final String PLAY_RECORD_SYNCHRONZIE_TYPE = "play_record_synchronzie_type";
	// 节目最新片段(更新至1集或1季)
	static final String PLAY_RECORD_EPISODE_UPDATE_INFO = "play_record_episode_info";
	// 节目外部连接(ourl)
	static final String PLAY_RECORD_EXTERNAL_URL = "play_record_external_url";
	// 是否显示播放按钮( 0不显示, 1显示(默认))(btnply)
	static final String PLAY_RECORD_IS_SHOW_PLAY_BUTTON = "play_record_is_show_play_button";
	/**
	 * 创建播放记录表
	 */
	final String CREATE_PLAY_RECORD_TABLE = new StringBuilder()
			.append("CREATE TABLE IF NOT EXISTS ").append(TB_PLAY_RECORD)
			.append(" (").append(PLAY_RECORD_CID + " LONG,")
			.append(PLAY_RECORD_CCID + " LONG,")
			.append(PLAY_RECORD_CLID + " LONG,")
			.append(PLAY_RECORD_VIDEO_ID + " LONG,")
			.append(PLAY_RECORD_TYPE + " INT,")
			.append(PLAY_RECORD_CONTENT_TYPE + " INT,")
			.append(PLAY_RECORD_NAME + " TEXT,")
			.append(PLAY_RECORD_IMAGE_URL + " TEXT,")
			.append(PLAY_RECORD_PLAY_URL + " TEXT,")
			.append(PLAY_RECORD_ALREADY_PLAY_TIME + " LONG,")
			.append(PLAY_RECORD_TOTAL_TIME + " LONG,")
			.append(PLAY_RECORD_CTEATE_TIME + " LONG,")
			.append(PLAY_RECORD_IS_VIP + " INT,")
			.append(PLAY_RECORD_DESCRIPTION + " TEXT,")
			.append(PLAY_RECORD_REMOVE_URL + " TEXT,")
			.append(PLAY_RECORD_FAVOURITE_URL + " TEXT,")
			.append(PLAY_RECORD_DETAIL_URL + " TEXT,")
			.append(PLAY_RECORD_SHARE_URL + " TEXT,")
			.append(PLAY_RECORD_SYNCHRONZIE_TYPE + " INT,")
			.append(PLAY_RECORD_EPISODE_UPDATE_INFO + " TEXT,")
			.append(PLAY_RECORD_EXTERNAL_URL + " TEXT,")
			.append(PLAY_RECORD_IS_SHOW_PLAY_BUTTON + " INT").append(");")
			.toString();
	/**
	 * 通知表
	 */
	final static String TB_NOTIFICATION = "tb_notification";
	// id
	static final String NOTIFICATION_ID = "notification_id";
	// 服务器端id
	static final String NOTIFICATION_SERVER_ID = "notification_server_id";
	// 消息标题
	static final String NOTIFICATION_NAME = "notification_name";
	// 消息内容
	static final String NOTIFICATION_CONTENT = "notification_content";
	// 剧集名称
	static final String NOTIFICATION_DRAMA_NAME = "notification_drama_name";
	// 消息类型(0通知,1消息)
	static final String NOTIFICATION_TYPE = "notification_type";
	// 消息内容类型(1 系统通知 ,2 精彩影讯,3 热剧追播,4 更多精彩,5 评论回复)(qtp)
	static final String NOTIFICATION_CONTENT_TYPE = "notification_content_type";
	// 消息内容展示类型(type=1 图片+文字形式,type=2 纯文字链接形式,type=7 纯文字无链接形式)(type)
	static final String NOTIFICATION_CONTENT_PATTERN_TYPE = "notification_content_pattern_type";
	// 外部通知展现形式(用户未设置时使用)(1 系统通知栏展现,2 通知弹框展现)(showtype)
	static final String NOTIFICATION_SHOW_TYPE = "notification_show_type";
	// 消息播放类型(0直接播放,1去原网页)(toply)
	static final String NOTIFICATION_PLAY_TYPE = "notification_play_type";
	// 消息外链类型(0 访问播放接口,1 访问详情页接口,2 打开大海报页,3 打开 wap 网页,4 下载应用,5 打开计费页面,6 打开评论列表,8
	// 打开原始网页,9 打开频道或专题)(utp)
	static final String NOTIFICATION_EXTERNAL_TYPE = "notification_external_type";
	// 节目清晰度(1标清,2高清,3超清,例如：1,2,3 表示同时存在标清、高清、超清)(dfnt)
	static final String NOTIFICATION_DEFINITION_TYPE = "notification_definition_type";
	// 消息图片路径(posterpic)
	static final String NOTIFICATION_IMAGE_URL = "notification_image_url";
	// 消息图片路径(pic)
	static final String NOTIFICATION_ICON_URL = "notification_icon_url";
	// 消息外链,原始页面地址(ourl)
	static final String NOTIFICATION_EXTERNAL_URL = "notification_external_url";
	// 消息连接(utp参数指定的链接地址type=1,2 时存在)(url)
	static final String NOTIFICATION_URL = "notification_url";
	// 分享地址(weibourl)
	static final String NOTIFICATION_SHARE_URL = "notification_share_url";
	// 消息创建时间
	static final String NOTIFICATION_CREATE_TIME = "notification_create_time";
	// 评论回复时间 utp=6 时有效(time)
	static final String NOTIFICATION_COMMENT_REPLY_TIME = "notification_comment_reply_time";
	// 反馈时间
	static final String NOTIFICATION_FEED_BACK_TIME = "notification_feed_back_time";
	// 反馈内容
	static final String NOTIFICATION_FEED_BACK_DESC = "notification_feed_back_desc";
	// 消息是否已读
	static final String NOTIFICATION_IS_READ = "notification_is_read";
	// 消息是否已展示
	static final String NOTIFICATION_IS_SHOW = "notification_is_show";
	// 是否显示播放按钮( 0不显示, 1显示(默认))(btnply)
	static final String NOTIFICATION_IS_SHOW_PLAY_BUTTON = "notification_is_show_play_button";
	// 显示下载按钮(0不显示, 1显示(默认))(btndown)
	static final String NOTIFICATION_IS_SHOW_DOWNLOAD_BUTTON = "notification_is_show_download_button";
	/**
	 * 创建通知表
	 */
	final String CREATE_NOTIFICATION_TABLE = new StringBuilder()
			.append("CREATE TABLE IF NOT EXISTS ").append(TB_NOTIFICATION)
			.append(" (")
			.append(NOTIFICATION_ID + " INTEGER PRIMARY KEY autoincrement,")
			.append(NOTIFICATION_SERVER_ID + " TEXT,")
			.append(NOTIFICATION_NAME + " TEXT,")
			.append(NOTIFICATION_CONTENT + " TEXT,")
			.append(NOTIFICATION_DRAMA_NAME + " TEXT,")
			.append(NOTIFICATION_TYPE + " INT,")
			.append(NOTIFICATION_CONTENT_TYPE + " INT,")
			.append(NOTIFICATION_CONTENT_PATTERN_TYPE + " INT,")
			.append(NOTIFICATION_SHOW_TYPE + " INT,")
			.append(NOTIFICATION_PLAY_TYPE + " INT,")
			.append(NOTIFICATION_EXTERNAL_TYPE + " INT,")
			.append(NOTIFICATION_DEFINITION_TYPE + " TEXT,")
			.append(NOTIFICATION_IMAGE_URL + " TEXT,")
			.append(NOTIFICATION_ICON_URL + " TEXT,")
			.append(NOTIFICATION_EXTERNAL_URL + " TEXT,")
			.append(NOTIFICATION_URL + " TEXT,")
			.append(NOTIFICATION_SHARE_URL + " TEXT,")
			.append(NOTIFICATION_CREATE_TIME + " LONG,")
			.append(NOTIFICATION_COMMENT_REPLY_TIME + " TEXT,")
			.append(NOTIFICATION_FEED_BACK_TIME + " TEXT,")
			.append(NOTIFICATION_FEED_BACK_DESC + " TEXT,")
			.append(NOTIFICATION_IS_READ + " INT,")
			.append(NOTIFICATION_IS_SHOW + " INT,")
			.append(NOTIFICATION_IS_SHOW_PLAY_BUTTON + " INT,")
			.append(NOTIFICATION_IS_SHOW_DOWNLOAD_BUTTON + " INT").append(");")
			.toString();
	/**
	 * 内容预约表
	 */
	final static String TB_CONTENT_SUBSCRIBE = "tb_content_subscribe";
	// id
	static final String CONTENT_SUBSCRIBE_ID = "content_subscribe_id";
	// 预约名称
	static final String CONTENT_SUBSCRIBE_NAME = "content_subscribe_name";
	// 预约连接
	static final String CONTENT_SUBSCRIBE_URL = "content_subscribe_url";
	// 预约时间
	static final String CONTENT_SUBSCRIBE_TIME = "content_subscribe_time";
	/**
	 * 创建内容预约表
	 */
	final String CREATE_CONTENT_SUBSCRIBE_TABLE = new StringBuilder()
			.append("CREATE TABLE IF NOT EXISTS ")
			.append(TB_CONTENT_SUBSCRIBE)
			.append(" (")
			.append(CONTENT_SUBSCRIBE_ID
					+ " INTEGER PRIMARY KEY autoincrement,")
			.append(CONTENT_SUBSCRIBE_NAME + " TEXT,")
			.append(CONTENT_SUBSCRIBE_URL + " TEXT,")
			.append(CONTENT_SUBSCRIBE_TIME + " LONG").append(");").toString();

	/**
	 * 自定义频道表
	 */
	final static String TB_CUSTOM_CHANNEL = "tb_custom_channel";
	// id
	static final String _ID = "_id";
	// 栏目ID
	static final String CUSTOM_CHANNEL_ID = "custom_channel_id";
	// 栏目名称
	static final String CUSTOM_CHANNEL_NAME = "custom_channel_name";
	// 栏目模版类型
	static final String CUSTOM_CHANNEL_TYPE = "custom_channel_type";
	// 栏目连接
	static final String CUSTOM_CHANNEL_URL = "custom_channel_url";
	// 是否自定义栏目
	static final String CUSTOM_CHANNEL_IS_CUSTOM = "custom_channel_is_custom";
	// 是否显示栏目
	static final String CUSTOM_CHANNEL_IS_SHOW = "custom_channel_is_show";
	// 是否为新频道
	static final String CUSTOM_CHANNEL_IS_NEW = "custom_channel_is_new";
	/**
	 * 创建自定义频道表
	 */
	final String CREATE_CUSTOM_CHANNEL_TABLE = new StringBuilder()
			.append("CREATE TABLE IF NOT EXISTS ").append(TB_CUSTOM_CHANNEL)
			.append(" (").append(_ID + " INTEGER PRIMARY KEY autoincrement,")
			.append(CUSTOM_CHANNEL_ID + " TEXT,")
			.append(CUSTOM_CHANNEL_NAME + " TEXT,")
			.append(CUSTOM_CHANNEL_TYPE + " TEXT,")
			.append(CUSTOM_CHANNEL_URL + " TEXT,")
			.append(CUSTOM_CHANNEL_IS_CUSTOM + " TEXT,")
			.append(CUSTOM_CHANNEL_IS_SHOW + " TEXT,")
			.append(CUSTOM_CHANNEL_IS_NEW + " TEXT").append(");").toString();

	/**
	 * 文件下载表
	 */
	final static String TB_FILE_DOWNLOAD = "tb_file_download";
	/**
	 * 文件下载临时表
	 */
	final static String TB_FILE_DOWNLOAD_BACK_UP = "tb_file_download_back_up";
	// id(自增长)
	static final String FILE_DOWNLOAD_ID = "id";
	// 文件名称
	static final String FILE_DOWNLOAD_FILE_NAME = "file_download_file_name";
	// 文件版本名称
	static final String FILE_DOWNLOAD_VERSION_NAME = "file_download_version_name";
	// 文件版本号
	static final String FILE_DOWNLOAD_VERSION_CODE = "file_download_version_code";
	// 文件URL
	static final String FILE_DOWNLOAD_URL = "file_download_url";
	// 文件已经下载的大小
	static final String FILE_DOWNLOAD_ALREADY_SIZE = "file_download_already_size";
	// 文件总大小
	static final String FILE_DOWNLOAD_TOTAL_SIZE = "file_download_total_size";
	// 文件存储路径
	static final String FILE_DOWNLOAD_STORAGE_PATH = "file_download_storage_path";
	// 文件下载状态
	static final String FILE_DOWNLOAD_STATE_TYPE = "file_download_state_type";
	// 文件下载是否现在notification
	static final String FILE_DOWNLOAD_IS_NOTIFICATION = "file_download_is_notification";
	// 文件下载是否安装
	static final String FILE_DOWNLOAD_IS_INSTALL = "file_download_is_install";
	// 文件下载失败时是否提示消息
	static final String FILE_DOWNLOAD_IS_ERROR_TOAST = "file_download_is_error_toast";
	// 文件下载成功上报
	static final String FILE_DOWNLOAD_REPORT_TYPE = "file_download_report_type";
	// 文件下载类型
	static final String FILE_DOWNLOAD_TYPE = "file_download_type";
	// 文件下载是否限速
	static final String FILE_DOWNLOAD_IS_LIMIT_SPEED = "file_download_is_limit_speed";
	// 文件是否需要升级
	static final String FILE_DOWNLOAD_IS_UPGRADE = "file_download_is_upgrade";
	/**
	 * 创建文件下载表
	 */
	final String CREATE_FILE_DOWNLOAD_TABLE = new StringBuilder()
			.append("CREATE TABLE IF NOT EXISTS ").append(TB_FILE_DOWNLOAD)
			.append(" (")
			.append(FILE_DOWNLOAD_ID + " INTEGER PRIMARY KEY autoincrement,")
			.append(FILE_DOWNLOAD_FILE_NAME + " TEXT,")
			.append(FILE_DOWNLOAD_VERSION_NAME + " TEXT,")
			.append(FILE_DOWNLOAD_VERSION_CODE + " INT,")
			.append(FILE_DOWNLOAD_URL + " TEXT,")
			.append(FILE_DOWNLOAD_ALREADY_SIZE + " LONG,")
			.append(FILE_DOWNLOAD_TOTAL_SIZE + " LONG,")
			.append(FILE_DOWNLOAD_STORAGE_PATH + " TEXT,")
			.append(FILE_DOWNLOAD_STATE_TYPE + " TEXT,")
			.append(FILE_DOWNLOAD_IS_NOTIFICATION + " INT,")
			.append(FILE_DOWNLOAD_IS_INSTALL + " INT,")
			.append(FILE_DOWNLOAD_IS_ERROR_TOAST + " INT,")
			.append(FILE_DOWNLOAD_REPORT_TYPE + " INT,")
			.append(FILE_DOWNLOAD_TYPE + " INT,")
			.append(FILE_DOWNLOAD_IS_LIMIT_SPEED + " INT,")
			.append(FILE_DOWNLOAD_IS_UPGRADE + " INT").append(");").toString();
	/**
	 * 创建文件下载临时表(4.0升级4.0.1)
	 */
	final String CREATE_FILE_DOWNLOAD_TEMPORARY_TABLE_4_0_TO_4_0_1 = new StringBuilder()
			.append("CREATE TEMPORARY TABLE IF NOT EXISTS ")
			.append(TB_FILE_DOWNLOAD_BACK_UP).append(" (")
			.append(FILE_DOWNLOAD_ID + " INTEGER PRIMARY KEY autoincrement,")
			.append(FILE_DOWNLOAD_FILE_NAME + " TEXT,")
			.append(FILE_DOWNLOAD_URL + " TEXT,")
			.append(FILE_DOWNLOAD_ALREADY_SIZE + " LONG,")
			.append(FILE_DOWNLOAD_TOTAL_SIZE + " LONG,")
			.append(FILE_DOWNLOAD_STORAGE_PATH + " TEXT,")
			.append(FILE_DOWNLOAD_STATE_TYPE + " TEXT,")
			.append(FILE_DOWNLOAD_IS_NOTIFICATION + " INT,")
			.append(FILE_DOWNLOAD_IS_INSTALL + " INT,")
			.append(FILE_DOWNLOAD_IS_ERROR_TOAST + " INT,")
			.append(FILE_DOWNLOAD_REPORT_TYPE + " INT,")
			.append(FILE_DOWNLOAD_TYPE + " INT,")
			.append(FILE_DOWNLOAD_IS_LIMIT_SPEED + " INT,")
			.append(FILE_DOWNLOAD_IS_UPGRADE + " INT").append(");").toString();

}
